let id = getQueryString('productid')
let $item = $('.item') 
let $comment = $('#comment');
let init = {
  url : 'http://chst.vip:1234/api/getmoneyctrlproduct?productid=' + id,
  success : e,
}

function e (res){
  let element = res.result[0];

  let regExp=/(?<=imgurl=)[^'"]*/
  let imgUrl = element.productImg2.match(regExp);
  console.log(imgUrl);
  let itemStr = `<div class="infoR">
  <div class="title">
    <h4>${element.productName}</h4>
  </div>
  <div class="other">
    <span>${element.productFrom} | ${element.productTime}</span>
    <i>${element.productTips}</i>
  </div>
  <div class="container">
    <p>
      <img src="${imgUrl[0]}" alt="">
      ${element.productInfo}         
    </p>
  </div>
  <div class="bigimg">

    <img src="${imgUrl[0]}" style="width:300px" alt="">
  </div>
  <div class="city">
      ${element.productCity}
  </div>
  </div>`
$item.append(itemStr)
$comment.append(element.productComment)
}

ajaxAPI(init)